package com.cskaoyan.mapper;

import com.cskaoyan.bean.OptionsVo;
import com.cskaoyan.bean.Role;
import com.cskaoyan.bean.RoleExample;

import java.util.List;

import com.cskaoyan.bean.vo.PermissionsVo;
import com.cskaoyan.bean.vo.SystemPermissionsBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author
 * @date 2020/12/6 19:44
 */
@Mapper
public interface RoleMapper {
    long countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);


    List<OptionsVo> selectValueAndLable();

    int countManager(@Param("id") Integer id);

    List<String> selectAssignedPermissions(@Param("roleId") String roleId);

    List<SystemPermissionsBean> selectSystemPermissions();

    List<String> selectAssigned();

}